﻿using System;
using System.Web;

using SBPweb.Common.PatternHelpers;

namespace SBPweb.Relay.Processor
{

    public class RequestHandler : IHttpHandler
    {

        #region Private fields

        private static Uri relayBaseUri;

        #endregion

        #region Property accessors

        public static Uri RelayBaseUri
        {
            get
            {
                return relayBaseUri;
            }
            set
            {
                relayBaseUri = value;
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }

        #endregion

        #region Methods

        public void ProcessRequest(HttpContext context)
        {
            ContextProcessor processor = new ContextProcessor(context, RelayBaseUri);
            processor.Process();
        }

        #endregion

    }

}